package com.me.Inheritor;

import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.math.Vector2;

public class GameObject 
{
	protected Vector2	position;
	protected float		width;
	protected float		height;

	private int			textureID;
	private int			id;	// May not need
	
	public GameObject()
	{
		position = new Vector2( 0,0 );
		textureID = -1;
		id = -1;
	}

	public void Render( SpriteBatch batch )
	{
		TextureManager tm = GameData.getTextureManager();
		
		if( textureID != -1 )
		{
			Texture tex = tm.getTexture( textureID );
			batch.draw( tex,position.x,position.y,width,height );
		}
	}
	
	public void setWidth( float fWidth )
	{
		width = fWidth;
	}
	public void setHeight( float fHeight )
	{
		height = fHeight;
	}
	public float getX() { return position.x; }
	public float getY() { return position.y; }
	public Vector2 getPosition() { return position; }
	public void setX( float x ) { position.x = x; }
	public void setY( float y ) { position.y = y; }
	public void setPosition( Vector2 pos )
	{
		position.x = pos.x;
		position.y = pos.y;
	}
	public void setTexture( int texID )
	{ 
		textureID = texID;
	}
	public int getTexture()
	{
		return textureID;
	}
	public float getWidth() { return width; }
	public float getHeight() { return height; }
	public int getID() { return id; }
	public void setID( int _objID ) { id = _objID; }
	public void Dispose()
	{
	}
}
